// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.

// This code was generated by google-apis-code-generator 1.5.1

// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
//   Cloud Storage JSON API (storage/v1)
// Generated from:
//   Version: v1
//   Revision: 20171004
// Generated by:
//    Tool: google-apis-code-generator 1.5.1
//     C++: 0.1.5
#ifndef  GOOGLE_STORAGE_API_OBJECT_H_
#define  GOOGLE_STORAGE_API_OBJECT_H_

#include <string>
#include "googleapis/base/integral_types.h"
#include "googleapis/base/macros.h"
#include "googleapis/client/data/jsoncpp_data.h"
#include "googleapis/client/util/date_time.h"
#include "googleapis/strings/stringpiece.h"

#include "google/storage_api/object_access_control.h"

namespace Json {
class Value;
}  // namespace Json

namespace google_storage_api {
using namespace googleapis;

/**
 * An object.
 *
 * @ingroup DataObject
 */
class Object : public client::JsonCppData {
 public:
  /**
   * Metadata of customer-supplied encryption key, if the object is encrypted by
   * such a key.
   *
   * @ingroup DataObject
   */
  class ObjectCustomerEncryption : public client::JsonCppData {
   public:
    /**
     * Creates a new default instance.
     *
     * @return Ownership is passed back to the caller.
     */
    static ObjectCustomerEncryption* New();

    /**
     * Standard constructor for an immutable data object instance.
     *
     * @param[in] storage  The underlying data storage for this instance.
     */
    explicit ObjectCustomerEncryption(const Json::Value& storage);

    /**
     * Standard constructor for a mutable data object instance.
     *
     * @param[in] storage  The underlying data storage for this instance.
     */
    explicit ObjectCustomerEncryption(Json::Value* storage);

    /**
     * Standard destructor.
     */
    virtual ~ObjectCustomerEncryption();

    /**
     * Returns a string denoting the type of this data object.
     *
     * @return <code>google_storage_api::ObjectCustomerEncryption</code>
     */
    const char* GetTypeName() const {
      return "google_storage_api::ObjectCustomerEncryption";
    }

    /**
     * Determine if the '<code>encryptionAlgorithm</code>' attribute was set.
     *
     * @return true if the '<code>encryptionAlgorithm</code>' attribute was set.
     */
    bool has_encryption_algorithm() const {
      return Storage().isMember("encryptionAlgorithm");
    }

    /**
     * Clears the '<code>encryptionAlgorithm</code>' attribute.
     */
    void clear_encryption_algorithm() {
      MutableStorage()->removeMember("encryptionAlgorithm");
    }


    /**
     * Get the value of the '<code>encryptionAlgorithm</code>' attribute.
     */
    const StringPiece get_encryption_algorithm() const {
      const Json::Value& v = Storage("encryptionAlgorithm");
      if (v == Json::Value::null) return StringPiece("");
      return StringPiece(v.asCString());
    }

    /**
     * Change the '<code>encryptionAlgorithm</code>' attribute.
     *
     * The encryption algorithm.
     *
     * @param[in] value The new value.
     */
    void set_encryption_algorithm(const StringPiece& value) {
      *MutableStorage("encryptionAlgorithm") = value.data();
    }

    /**
     * Determine if the '<code>keySha256</code>' attribute was set.
     *
     * @return true if the '<code>keySha256</code>' attribute was set.
     */
    bool has_key_sha256() const {
      return Storage().isMember("keySha256");
    }

    /**
     * Clears the '<code>keySha256</code>' attribute.
     */
    void clear_key_sha256() {
      MutableStorage()->removeMember("keySha256");
    }


    /**
     * Get the value of the '<code>keySha256</code>' attribute.
     */
    const StringPiece get_key_sha256() const {
      const Json::Value& v = Storage("keySha256");
      if (v == Json::Value::null) return StringPiece("");
      return StringPiece(v.asCString());
    }

    /**
     * Change the '<code>keySha256</code>' attribute.
     *
     * SHA256 hash value of the encryption key.
     *
     * @param[in] value The new value.
     */
    void set_key_sha256(const StringPiece& value) {
      *MutableStorage("keySha256") = value.data();
    }

   private:
    void operator=(const ObjectCustomerEncryption&);
  };  // ObjectCustomerEncryption
  /**
   * The owner of the object. This will always be the uploader of the object.
   *
   * @ingroup DataObject
   */
  class ObjectOwner : public client::JsonCppData {
   public:
    /**
     * Creates a new default instance.
     *
     * @return Ownership is passed back to the caller.
     */
    static ObjectOwner* New();

    /**
     * Standard constructor for an immutable data object instance.
     *
     * @param[in] storage  The underlying data storage for this instance.
     */
    explicit ObjectOwner(const Json::Value& storage);

    /**
     * Standard constructor for a mutable data object instance.
     *
     * @param[in] storage  The underlying data storage for this instance.
     */
    explicit ObjectOwner(Json::Value* storage);

    /**
     * Standard destructor.
     */
    virtual ~ObjectOwner();

    /**
     * Returns a string denoting the type of this data object.
     *
     * @return <code>google_storage_api::ObjectOwner</code>
     */
    const char* GetTypeName() const {
      return "google_storage_api::ObjectOwner";
    }

    /**
     * Determine if the '<code>entity</code>' attribute was set.
     *
     * @return true if the '<code>entity</code>' attribute was set.
     */
    bool has_entity() const {
      return Storage().isMember("entity");
    }

    /**
     * Clears the '<code>entity</code>' attribute.
     */
    void clear_entity() {
      MutableStorage()->removeMember("entity");
    }


    /**
     * Get the value of the '<code>entity</code>' attribute.
     */
    const StringPiece get_entity() const {
      const Json::Value& v = Storage("entity");
      if (v == Json::Value::null) return StringPiece("");
      return StringPiece(v.asCString());
    }

    /**
     * Change the '<code>entity</code>' attribute.
     *
     * The entity, in the form user-userId.
     *
     * @param[in] value The new value.
     */
    void set_entity(const StringPiece& value) {
      *MutableStorage("entity") = value.data();
    }

    /**
     * Determine if the '<code>entityId</code>' attribute was set.
     *
     * @return true if the '<code>entityId</code>' attribute was set.
     */
    bool has_entity_id() const {
      return Storage().isMember("entityId");
    }

    /**
     * Clears the '<code>entityId</code>' attribute.
     */
    void clear_entity_id() {
      MutableStorage()->removeMember("entityId");
    }


    /**
     * Get the value of the '<code>entityId</code>' attribute.
     */
    const StringPiece get_entity_id() const {
      const Json::Value& v = Storage("entityId");
      if (v == Json::Value::null) return StringPiece("");
      return StringPiece(v.asCString());
    }

    /**
     * Change the '<code>entityId</code>' attribute.
     *
     * The ID for the entity.
     *
     * @param[in] value The new value.
     */
    void set_entity_id(const StringPiece& value) {
      *MutableStorage("entityId") = value.data();
    }

   private:
    void operator=(const ObjectOwner&);
  };  // ObjectOwner
  /**
   * Creates a new default instance.
   *
   * @return Ownership is passed back to the caller.
   */
  static Object* New();

  /**
   * Standard constructor for an immutable data object instance.
   *
   * @param[in] storage  The underlying data storage for this instance.
   */
  explicit Object(const Json::Value& storage);

  /**
   * Standard constructor for a mutable data object instance.
   *
   * @param[in] storage  The underlying data storage for this instance.
   */
  explicit Object(Json::Value* storage);

  /**
   * Standard destructor.
   */
  virtual ~Object();

  /**
   * Returns a string denoting the type of this data object.
   *
   * @return <code>google_storage_api::Object</code>
   */
  const char* GetTypeName() const {
    return "google_storage_api::Object";
  }

  /**
   * Determine if the '<code>acl</code>' attribute was set.
   *
   * @return true if the '<code>acl</code>' attribute was set.
   */
  bool has_acl() const {
    return Storage().isMember("acl");
  }

  /**
   * Clears the '<code>acl</code>' attribute.
   */
  void clear_acl() {
    MutableStorage()->removeMember("acl");
  }


  /**
   * Get a reference to the value of the '<code>acl</code>' attribute.
   */
  const client::JsonCppArray<ObjectAccessControl > get_acl() const;

  /**
   * Gets a reference to a mutable value of the '<code>acl</code>' property.
   *
   * Access controls on the object.
   *
   * @return The result can be modified to change the attribute value.
   */
  client::JsonCppArray<ObjectAccessControl > mutable_acl();

  /**
   * Determine if the '<code>bucket</code>' attribute was set.
   *
   * @return true if the '<code>bucket</code>' attribute was set.
   */
  bool has_bucket() const {
    return Storage().isMember("bucket");
  }

  /**
   * Clears the '<code>bucket</code>' attribute.
   */
  void clear_bucket() {
    MutableStorage()->removeMember("bucket");
  }


  /**
   * Get the value of the '<code>bucket</code>' attribute.
   */
  const StringPiece get_bucket() const {
    const Json::Value& v = Storage("bucket");
    if (v == Json::Value::null) return StringPiece("");
    return StringPiece(v.asCString());
  }

  /**
   * Change the '<code>bucket</code>' attribute.
   *
   * The name of the bucket containing this object.
   *
   * @param[in] value The new value.
   */
  void set_bucket(const StringPiece& value) {
    *MutableStorage("bucket") = value.data();
  }

  /**
   * Determine if the '<code>cacheControl</code>' attribute was set.
   *
   * @return true if the '<code>cacheControl</code>' attribute was set.
   */
  bool has_cache_control() const {
    return Storage().isMember("cacheControl");
  }

  /**
   * Clears the '<code>cacheControl</code>' attribute.
   */
  void clear_cache_control() {
    MutableStorage()->removeMember("cacheControl");
  }


  /**
   * Get the value of the '<code>cacheControl</code>' attribute.
   */
  const StringPiece get_cache_control() const {
    const Json::Value& v = Storage("cacheControl");
    if (v == Json::Value::null) return StringPiece("");
    return StringPiece(v.asCString());
  }

  /**
   * Change the '<code>cacheControl</code>' attribute.
   *
   * Cache-Control directive for the object data. If omitted, and the object is
   * accessible to all anonymous users, the default will be public, max-
   * age=3600.
   *
   * @param[in] value The new value.
   */
  void set_cache_control(const StringPiece& value) {
    *MutableStorage("cacheControl") = value.data();
  }

  /**
   * Determine if the '<code>componentCount</code>' attribute was set.
   *
   * @return true if the '<code>componentCount</code>' attribute was set.
   */
  bool has_component_count() const {
    return Storage().isMember("componentCount");
  }

  /**
   * Clears the '<code>componentCount</code>' attribute.
   */
  void clear_component_count() {
    MutableStorage()->removeMember("componentCount");
  }


  /**
   * Get the value of the '<code>componentCount</code>' attribute.
   */
  int32 get_component_count() const {
    const Json::Value& storage = Storage("componentCount");
    return client::JsonValueToCppValueHelper<int32 >(storage);
  }

  /**
   * Change the '<code>componentCount</code>' attribute.
   *
   * Number of underlying components that make up this object. Components are
   * accumulated by compose operations.
   *
   * @param[in] value The new value.
   */
  void set_component_count(int32 value) {
    client::SetJsonValueFromCppValueHelper<int32 >(
      value, MutableStorage("componentCount"));
  }

  /**
   * Determine if the '<code>contentDisposition</code>' attribute was set.
   *
   * @return true if the '<code>contentDisposition</code>' attribute was set.
   */
  bool has_content_disposition() const {
    return Storage().isMember("contentDisposition");
  }

  /**
   * Clears the '<code>contentDisposition</code>' attribute.
   */
  void clear_content_disposition() {
    MutableStorage()->removeMember("contentDisposition");
  }


  /**
   * Get the value of the '<code>contentDisposition</code>' attribute.
   */
  const StringPiece get_content_disposition() const {
    const Json::Value& v = Storage("contentDisposition");
    if (v == Json::Value::null) return StringPiece("");
    return StringPiece(v.asCString());
  }

  /**
   * Change the '<code>contentDisposition</code>' attribute.
   *
   * Content-Disposition of the object data.
   *
   * @param[in] value The new value.
   */
  void set_content_disposition(const StringPiece& value) {
    *MutableStorage("contentDisposition") = value.data();
  }

  /**
   * Determine if the '<code>contentEncoding</code>' attribute was set.
   *
   * @return true if the '<code>contentEncoding</code>' attribute was set.
   */
  bool has_content_encoding() const {
    return Storage().isMember("contentEncoding");
  }

  /**
   * Clears the '<code>contentEncoding</code>' attribute.
   */
  void clear_content_encoding() {
    MutableStorage()->removeMember("contentEncoding");
  }


  /**
   * Get the value of the '<code>contentEncoding</code>' attribute.
   */
  const StringPiece get_content_encoding() const {
    const Json::Value& v = Storage("contentEncoding");
    if (v == Json::Value::null) return StringPiece("");
    return StringPiece(v.asCString());
  }

  /**
   * Change the '<code>contentEncoding</code>' attribute.
   *
   * Content-Encoding of the object data.
   *
   * @param[in] value The new value.
   */
  void set_content_encoding(const StringPiece& value) {
    *MutableStorage("contentEncoding") = value.data();
  }

  /**
   * Determine if the '<code>contentLanguage</code>' attribute was set.
   *
   * @return true if the '<code>contentLanguage</code>' attribute was set.
   */
  bool has_content_language() const {
    return Storage().isMember("contentLanguage");
  }

  /**
   * Clears the '<code>contentLanguage</code>' attribute.
   */
  void clear_content_language() {
    MutableStorage()->removeMember("contentLanguage");
  }


  /**
   * Get the value of the '<code>contentLanguage</code>' attribute.
   */
  const StringPiece get_content_language() const {
    const Json::Value& v = Storage("contentLanguage");
    if (v == Json::Value::null) return StringPiece("");
    return StringPiece(v.asCString());
  }

  /**
   * Change the '<code>contentLanguage</code>' attribute.
   *
   * Content-Language of the object data.
   *
   * @param[in] value The new value.
   */
  void set_content_language(const StringPiece& value) {
    *MutableStorage("contentLanguage") = value.data();
  }

  /**
   * Determine if the '<code>contentType</code>' attribute was set.
   *
   * @return true if the '<code>contentType</code>' attribute was set.
   */
  bool has_content_type() const {
    return Storage().isMember("contentType");
  }

  /**
   * Clears the '<code>contentType</code>' attribute.
   */
  void clear_content_type() {
    MutableStorage()->removeMember("contentType");
  }


  /**
   * Get the value of the '<code>contentType</code>' attribute.
   */
  const StringPiece get_content_type() const {
    const Json::Value& v = Storage("contentType");
    if (v == Json::Value::null) return StringPiece("");
    return StringPiece(v.asCString());
  }

  /**
   * Change the '<code>contentType</code>' attribute.
   *
   * Content-Type of the object data. If an object is stored without a Content-
   * Type, it is served as application/octet-stream.
   *
   * @param[in] value The new value.
   */
  void set_content_type(const StringPiece& value) {
    *MutableStorage("contentType") = value.data();
  }

  /**
   * Determine if the '<code>crc32c</code>' attribute was set.
   *
   * @return true if the '<code>crc32c</code>' attribute was set.
   */
  bool has_crc32c() const {
    return Storage().isMember("crc32c");
  }

  /**
   * Clears the '<code>crc32c</code>' attribute.
   */
  void clear_crc32c() {
    MutableStorage()->removeMember("crc32c");
  }


  /**
   * Get the value of the '<code>crc32c</code>' attribute.
   */
  const StringPiece get_crc32c() const {
    const Json::Value& v = Storage("crc32c");
    if (v == Json::Value::null) return StringPiece("");
    return StringPiece(v.asCString());
  }

  /**
   * Change the '<code>crc32c</code>' attribute.
   *
   * CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64
   * in big-endian byte order. For more information about using the CRC32c
   * checksum, see Hashes and ETags: Best Practices.
   *
   * @param[in] value The new value.
   */
  void set_crc32c(const StringPiece& value) {
    *MutableStorage("crc32c") = value.data();
  }

  /**
   * Determine if the '<code>customerEncryption</code>' attribute was set.
   *
   * @return true if the '<code>customerEncryption</code>' attribute was set.
   */
  bool has_customer_encryption() const {
    return Storage().isMember("customerEncryption");
  }

  /**
   * Clears the '<code>customerEncryption</code>' attribute.
   */
  void clear_customer_encryption() {
    MutableStorage()->removeMember("customerEncryption");
  }


  /**
   * Get a reference to the value of the '<code>customerEncryption</code>'
   * attribute.
   */
  const ObjectCustomerEncryption get_customer_encryption() const {
     const Json::Value& storage = Storage("customerEncryption");
    return client::JsonValueToCppValueHelper<ObjectCustomerEncryption >(storage);
  }

  /**
   * Gets a reference to a mutable value of the
   * '<code>customerEncryption</code>' property.
   *
   * Metadata of customer-supplied encryption key, if the object is encrypted by
   * such a key.
   *
   * @return The result can be modified to change the attribute value.
   */
  ObjectCustomerEncryption mutable_customerEncryption() {
    Json::Value* storage = MutableStorage("customerEncryption");
    return client::JsonValueToMutableCppValueHelper<ObjectCustomerEncryption >(storage);
  }

  /**
   * Determine if the '<code>etag</code>' attribute was set.
   *
   * @return true if the '<code>etag</code>' attribute was set.
   */
  bool has_etag() const {
    return Storage().isMember("etag");
  }

  /**
   * Clears the '<code>etag</code>' attribute.
   */
  void clear_etag() {
    MutableStorage()->removeMember("etag");
  }


  /**
   * Get the value of the '<code>etag</code>' attribute.
   */
  const StringPiece get_etag() const {
    const Json::Value& v = Storage("etag");
    if (v == Json::Value::null) return StringPiece("");
    return StringPiece(v.asCString());
  }

  /**
   * Change the '<code>etag</code>' attribute.
   *
   * HTTP 1.1 Entity tag for the object.
   *
   * @param[in] value The new value.
   */
  void set_etag(const StringPiece& value) {
    *MutableStorage("etag") = value.data();
  }

  /**
   * Determine if the '<code>generation</code>' attribute was set.
   *
   * @return true if the '<code>generation</code>' attribute was set.
   */
  bool has_generation() const {
    return Storage().isMember("generation");
  }

  /**
   * Clears the '<code>generation</code>' attribute.
   */
  void clear_generation() {
    MutableStorage()->removeMember("generation");
  }


  /**
   * Get the value of the '<code>generation</code>' attribute.
   */
  int64 get_generation() const {
    const Json::Value& storage = Storage("generation");
    return client::JsonValueToCppValueHelper<int64 >(storage);
  }

  /**
   * Change the '<code>generation</code>' attribute.
   *
   * The content generation of this object. Used for object versioning.
   *
   * @param[in] value The new value.
   */
  void set_generation(int64 value) {
    client::SetJsonValueFromCppValueHelper<int64 >(
      value, MutableStorage("generation"));
  }

  /**
   * Determine if the '<code>id</code>' attribute was set.
   *
   * @return true if the '<code>id</code>' attribute was set.
   */
  bool has_id() const {
    return Storage().isMember("id");
  }

  /**
   * Clears the '<code>id</code>' attribute.
   */
  void clear_id() {
    MutableStorage()->removeMember("id");
  }


  /**
   * Get the value of the '<code>id</code>' attribute.
   */
  const StringPiece get_id() const {
    const Json::Value& v = Storage("id");
    if (v == Json::Value::null) return StringPiece("");
    return StringPiece(v.asCString());
  }

  /**
   * Change the '<code>id</code>' attribute.
   *
   * The ID of the object, including the bucket name, object name, and
   * generation number.
   *
   * @param[in] value The new value.
   */
  void set_id(const StringPiece& value) {
    *MutableStorage("id") = value.data();
  }

  /**
   * Determine if the '<code>kind</code>' attribute was set.
   *
   * @return true if the '<code>kind</code>' attribute was set.
   */
  bool has_kind() const {
    return Storage().isMember("kind");
  }

  /**
   * Clears the '<code>kind</code>' attribute.
   */
  void clear_kind() {
    MutableStorage()->removeMember("kind");
  }


  /**
   * Get the value of the '<code>kind</code>' attribute.
   */
  const StringPiece get_kind() const {
    const Json::Value& v = Storage("kind");
    if (v == Json::Value::null) return StringPiece("");
    return StringPiece(v.asCString());
  }

  /**
   * Change the '<code>kind</code>' attribute.
   *
   * The kind of item this is. For objects, this is always storage#object.
   *
   * @param[in] value The new value.
   */
  void set_kind(const StringPiece& value) {
    *MutableStorage("kind") = value.data();
  }

  /**
   * Determine if the '<code>kmsKeyName</code>' attribute was set.
   *
   * @return true if the '<code>kmsKeyName</code>' attribute was set.
   */
  bool has_kms_key_name() const {
    return Storage().isMember("kmsKeyName");
  }

  /**
   * Clears the '<code>kmsKeyName</code>' attribute.
   */
  void clear_kms_key_name() {
    MutableStorage()->removeMember("kmsKeyName");
  }


  /**
   * Get the value of the '<code>kmsKeyName</code>' attribute.
   */
  const StringPiece get_kms_key_name() const {
    const Json::Value& v = Storage("kmsKeyName");
    if (v == Json::Value::null) return StringPiece("");
    return StringPiece(v.asCString());
  }

  /**
   * Change the '<code>kmsKeyName</code>' attribute.
   *
   * Cloud KMS Key used to encrypt this object, if the object is encrypted by
   * such a key.
   *
   * @param[in] value The new value.
   */
  void set_kms_key_name(const StringPiece& value) {
    *MutableStorage("kmsKeyName") = value.data();
  }

  /**
   * Determine if the '<code>md5Hash</code>' attribute was set.
   *
   * @return true if the '<code>md5Hash</code>' attribute was set.
   */
  bool has_md5_hash() const {
    return Storage().isMember("md5Hash");
  }

  /**
   * Clears the '<code>md5Hash</code>' attribute.
   */
  void clear_md5_hash() {
    MutableStorage()->removeMember("md5Hash");
  }


  /**
   * Get the value of the '<code>md5Hash</code>' attribute.
   */
  const StringPiece get_md5_hash() const {
    const Json::Value& v = Storage("md5Hash");
    if (v == Json::Value::null) return StringPiece("");
    return StringPiece(v.asCString());
  }

  /**
   * Change the '<code>md5Hash</code>' attribute.
   *
   * MD5 hash of the data; encoded using base64. For more information about
   * using the MD5 hash, see Hashes and ETags: Best Practices.
   *
   * @param[in] value The new value.
   */
  void set_md5_hash(const StringPiece& value) {
    *MutableStorage("md5Hash") = value.data();
  }

  /**
   * Determine if the '<code>mediaLink</code>' attribute was set.
   *
   * @return true if the '<code>mediaLink</code>' attribute was set.
   */
  bool has_media_link() const {
    return Storage().isMember("mediaLink");
  }

  /**
   * Clears the '<code>mediaLink</code>' attribute.
   */
  void clear_media_link() {
    MutableStorage()->removeMember("mediaLink");
  }


  /**
   * Get the value of the '<code>mediaLink</code>' attribute.
   */
  const StringPiece get_media_link() const {
    const Json::Value& v = Storage("mediaLink");
    if (v == Json::Value::null) return StringPiece("");
    return StringPiece(v.asCString());
  }

  /**
   * Change the '<code>mediaLink</code>' attribute.
   *
   * Media download link.
   *
   * @param[in] value The new value.
   */
  void set_media_link(const StringPiece& value) {
    *MutableStorage("mediaLink") = value.data();
  }

  /**
   * Determine if the '<code>metadata</code>' attribute was set.
   *
   * @return true if the '<code>metadata</code>' attribute was set.
   */
  bool has_metadata() const {
    return Storage().isMember("metadata");
  }

  /**
   * Clears the '<code>metadata</code>' attribute.
   */
  void clear_metadata() {
    MutableStorage()->removeMember("metadata");
  }


  /**
   * Get a reference to the value of the '<code>metadata</code>' attribute.
   */
  const client::JsonCppAssociativeArray<string > get_metadata() const {
     const Json::Value& storage = Storage("metadata");
    return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
  }

  /**
   * Gets a reference to a mutable value of the '<code>metadata</code>'
   * property.
   *
   * User-provided metadata, in key/value pairs.
   *
   * @return The result can be modified to change the attribute value.
   */
  client::JsonCppAssociativeArray<string > mutable_metadata() {
    Json::Value* storage = MutableStorage("metadata");
    return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
  }

  /**
   * Determine if the '<code>metageneration</code>' attribute was set.
   *
   * @return true if the '<code>metageneration</code>' attribute was set.
   */
  bool has_metageneration() const {
    return Storage().isMember("metageneration");
  }

  /**
   * Clears the '<code>metageneration</code>' attribute.
   */
  void clear_metageneration() {
    MutableStorage()->removeMember("metageneration");
  }


  /**
   * Get the value of the '<code>metageneration</code>' attribute.
   */
  int64 get_metageneration() const {
    const Json::Value& storage = Storage("metageneration");
    return client::JsonValueToCppValueHelper<int64 >(storage);
  }

  /**
   * Change the '<code>metageneration</code>' attribute.
   *
   * The version of the metadata for this object at this generation. Used for
   * preconditions and for detecting changes in metadata. A metageneration
   * number is only meaningful in the context of a particular generation of a
   * particular object.
   *
   * @param[in] value The new value.
   */
  void set_metageneration(int64 value) {
    client::SetJsonValueFromCppValueHelper<int64 >(
      value, MutableStorage("metageneration"));
  }

  /**
   * Determine if the '<code>name</code>' attribute was set.
   *
   * @return true if the '<code>name</code>' attribute was set.
   */
  bool has_name() const {
    return Storage().isMember("name");
  }

  /**
   * Clears the '<code>name</code>' attribute.
   */
  void clear_name() {
    MutableStorage()->removeMember("name");
  }


  /**
   * Get the value of the '<code>name</code>' attribute.
   */
  const StringPiece get_name() const {
    const Json::Value& v = Storage("name");
    if (v == Json::Value::null) return StringPiece("");
    return StringPiece(v.asCString());
  }

  /**
   * Change the '<code>name</code>' attribute.
   *
   * The name of the object. Required if not specified by URL parameter.
   *
   * @param[in] value The new value.
   */
  void set_name(const StringPiece& value) {
    *MutableStorage("name") = value.data();
  }

  /**
   * Determine if the '<code>owner</code>' attribute was set.
   *
   * @return true if the '<code>owner</code>' attribute was set.
   */
  bool has_owner() const {
    return Storage().isMember("owner");
  }

  /**
   * Clears the '<code>owner</code>' attribute.
   */
  void clear_owner() {
    MutableStorage()->removeMember("owner");
  }


  /**
   * Get a reference to the value of the '<code>owner</code>' attribute.
   */
  const ObjectOwner get_owner() const {
     const Json::Value& storage = Storage("owner");
    return client::JsonValueToCppValueHelper<ObjectOwner >(storage);
  }

  /**
   * Gets a reference to a mutable value of the '<code>owner</code>' property.
   *
   * The owner of the object. This will always be the uploader of the object.
   *
   * @return The result can be modified to change the attribute value.
   */
  ObjectOwner mutable_owner() {
    Json::Value* storage = MutableStorage("owner");
    return client::JsonValueToMutableCppValueHelper<ObjectOwner >(storage);
  }

  /**
   * Determine if the '<code>selfLink</code>' attribute was set.
   *
   * @return true if the '<code>selfLink</code>' attribute was set.
   */
  bool has_self_link() const {
    return Storage().isMember("selfLink");
  }

  /**
   * Clears the '<code>selfLink</code>' attribute.
   */
  void clear_self_link() {
    MutableStorage()->removeMember("selfLink");
  }


  /**
   * Get the value of the '<code>selfLink</code>' attribute.
   */
  const StringPiece get_self_link() const {
    const Json::Value& v = Storage("selfLink");
    if (v == Json::Value::null) return StringPiece("");
    return StringPiece(v.asCString());
  }

  /**
   * Change the '<code>selfLink</code>' attribute.
   *
   * The link to this object.
   *
   * @param[in] value The new value.
   */
  void set_self_link(const StringPiece& value) {
    *MutableStorage("selfLink") = value.data();
  }

  /**
   * Determine if the '<code>size</code>' attribute was set.
   *
   * @return true if the '<code>size</code>' attribute was set.
   */
  bool has_size() const {
    return Storage().isMember("size");
  }

  /**
   * Clears the '<code>size</code>' attribute.
   */
  void clear_size() {
    MutableStorage()->removeMember("size");
  }


  /**
   * Get the value of the '<code>size</code>' attribute.
   */
  uint64 get_size() const {
    const Json::Value& storage = Storage("size");
    return client::JsonValueToCppValueHelper<uint64 >(storage);
  }

  /**
   * Change the '<code>size</code>' attribute.
   *
   * Content-Length of the data in bytes.
   *
   * @param[in] value The new value.
   */
  void set_size(uint64 value) {
    client::SetJsonValueFromCppValueHelper<uint64 >(
      value, MutableStorage("size"));
  }

  /**
   * Determine if the '<code>storageClass</code>' attribute was set.
   *
   * @return true if the '<code>storageClass</code>' attribute was set.
   */
  bool has_storage_class() const {
    return Storage().isMember("storageClass");
  }

  /**
   * Clears the '<code>storageClass</code>' attribute.
   */
  void clear_storage_class() {
    MutableStorage()->removeMember("storageClass");
  }


  /**
   * Get the value of the '<code>storageClass</code>' attribute.
   */
  const StringPiece get_storage_class() const {
    const Json::Value& v = Storage("storageClass");
    if (v == Json::Value::null) return StringPiece("");
    return StringPiece(v.asCString());
  }

  /**
   * Change the '<code>storageClass</code>' attribute.
   *
   * Storage class of the object.
   *
   * @param[in] value The new value.
   */
  void set_storage_class(const StringPiece& value) {
    *MutableStorage("storageClass") = value.data();
  }

  /**
   * Determine if the '<code>timeCreated</code>' attribute was set.
   *
   * @return true if the '<code>timeCreated</code>' attribute was set.
   */
  bool has_time_created() const {
    return Storage().isMember("timeCreated");
  }

  /**
   * Clears the '<code>timeCreated</code>' attribute.
   */
  void clear_time_created() {
    MutableStorage()->removeMember("timeCreated");
  }


  /**
   * Get the value of the '<code>timeCreated</code>' attribute.
   */
  client::DateTime get_time_created() const {
    const Json::Value& storage = Storage("timeCreated");
    return client::JsonValueToCppValueHelper<client::DateTime >(storage);
  }

  /**
   * Change the '<code>timeCreated</code>' attribute.
   *
   * The creation time of the object in RFC 3339 format.
   *
   * @param[in] value The new value.
   */
  void set_time_created(client::DateTime value) {
    client::SetJsonValueFromCppValueHelper<client::DateTime >(
      value, MutableStorage("timeCreated"));
  }

  /**
   * Determine if the '<code>timeDeleted</code>' attribute was set.
   *
   * @return true if the '<code>timeDeleted</code>' attribute was set.
   */
  bool has_time_deleted() const {
    return Storage().isMember("timeDeleted");
  }

  /**
   * Clears the '<code>timeDeleted</code>' attribute.
   */
  void clear_time_deleted() {
    MutableStorage()->removeMember("timeDeleted");
  }


  /**
   * Get the value of the '<code>timeDeleted</code>' attribute.
   */
  client::DateTime get_time_deleted() const {
    const Json::Value& storage = Storage("timeDeleted");
    return client::JsonValueToCppValueHelper<client::DateTime >(storage);
  }

  /**
   * Change the '<code>timeDeleted</code>' attribute.
   *
   * The deletion time of the object in RFC 3339 format. Will be returned if and
   * only if this version of the object has been deleted.
   *
   * @param[in] value The new value.
   */
  void set_time_deleted(client::DateTime value) {
    client::SetJsonValueFromCppValueHelper<client::DateTime >(
      value, MutableStorage("timeDeleted"));
  }

  /**
   * Determine if the '<code>timeStorageClassUpdated</code>' attribute was set.
   *
   * @return true if the '<code>timeStorageClassUpdated</code>' attribute was
   * set.
   */
  bool has_time_storage_class_updated() const {
    return Storage().isMember("timeStorageClassUpdated");
  }

  /**
   * Clears the '<code>timeStorageClassUpdated</code>' attribute.
   */
  void clear_time_storage_class_updated() {
    MutableStorage()->removeMember("timeStorageClassUpdated");
  }


  /**
   * Get the value of the '<code>timeStorageClassUpdated</code>' attribute.
   */
  client::DateTime get_time_storage_class_updated() const {
    const Json::Value& storage = Storage("timeStorageClassUpdated");
    return client::JsonValueToCppValueHelper<client::DateTime >(storage);
  }

  /**
   * Change the '<code>timeStorageClassUpdated</code>' attribute.
   *
   * The time at which the object's storage class was last changed. When the
   * object is initially created, it will be set to timeCreated.
   *
   * @param[in] value The new value.
   */
  void set_time_storage_class_updated(client::DateTime value) {
    client::SetJsonValueFromCppValueHelper<client::DateTime >(
      value, MutableStorage("timeStorageClassUpdated"));
  }

  /**
   * Determine if the '<code>updated</code>' attribute was set.
   *
   * @return true if the '<code>updated</code>' attribute was set.
   */
  bool has_updated() const {
    return Storage().isMember("updated");
  }

  /**
   * Clears the '<code>updated</code>' attribute.
   */
  void clear_updated() {
    MutableStorage()->removeMember("updated");
  }


  /**
   * Get the value of the '<code>updated</code>' attribute.
   */
  client::DateTime get_updated() const {
    const Json::Value& storage = Storage("updated");
    return client::JsonValueToCppValueHelper<client::DateTime >(storage);
  }

  /**
   * Change the '<code>updated</code>' attribute.
   *
   * The modification time of the object metadata in RFC 3339 format.
   *
   * @param[in] value The new value.
   */
  void set_updated(client::DateTime value) {
    client::SetJsonValueFromCppValueHelper<client::DateTime >(
      value, MutableStorage("updated"));
  }

 private:
  void operator=(const Object&);
};  // Object
}  // namespace google_storage_api
#endif  // GOOGLE_STORAGE_API_OBJECT_H_
